de.ueberdosis.mp3info.id3v2
Interface DataSource

All Superinterfaces:
Defines
All Known Implementing Classes:
FileFrameDataSource

public interface DataSource
extends Defines


Field Summary
 
Fields inherited from interface de.ueberdosis.mp3info.Defines
DEFAULT_ENCODING, ID3V2_FOOTER_SIZE, ID3V2_FRAME_HEADER_SIZE, ID3V2_HEADER_SIZE, ID3V2_X_HEADER_SIZE, MP3_FRAME_HEADER_SIZE, SUPPORTED_NUMBER_OF_EXTENDED_FLAG_BYTES, testPositions, VERSION
 
Method Summary
 byte getByte()
          delivers the next available byte
 byte[] getBytes(long number)
          delivers the next available bytes
 long getBytesLeft()
          informs how many more bytes can be read
 byte[] getBytesTo(byte b)
          delivers the next bytes until a certain byte or the end is encountered
 boolean hasMoreBytes()
          informs whether there are more bytes than can be read
 void reset()
          Sets the internal pointer to the start of the data
 void seek(long position)
          Sets the internal pointer to a given position in the data
 

Method Detail

getByte

public byte getByte()
             throws SeekPastEndException
delivers the next available byte

Returns:
next byte
SeekPastEndException

getBytes

public byte[] getBytes(long number)
                throws SeekPastEndException
delivers the next available bytes

Parameters:
number - number of bytes to deliver
Returns:
demanded bytes
SeekPastEndException

getBytesTo

public byte[] getBytesTo(byte b)
delivers the next bytes until a certain byte or the end is encountered

Parameters:
b - at what byte to stop
Returns:
demanded bytes

reset

public void reset()
Sets the internal pointer to the start of the data


hasMoreBytes

public boolean hasMoreBytes()
informs whether there are more bytes than can be read

Returns:
true if there are bytes to follow

getBytesLeft

public long getBytesLeft()
informs how many more bytes can be read

Returns:
number of bytes to be read

seek

public void seek(long position)
          throws SeekPastEndException
Sets the internal pointer to a given position in the data

Parameters:
position - position to set the internal pointer to
SeekPastEndException